#ifndef _MAP_
#define _MAP_

#include <Tile.hpp>
#include <Crossroads.hpp>
#include <Troads.hpp>
#include <Noroad.hpp>
#include <Alley.hpp>
#include <Angleroads.hpp>
#include <Architect.hpp>
#include <LOD.hpp>

class Map
{
  public:
    Map(Architect* a, int s);
    ~Map();
    void draw() const;
    void setLOD(const Camera& cam);
    void setOcclusion(bool b);
    void drawWithOcclusion(std::vector<Tile*>* v, int depth) const;
    bool isOcclusionAvble();
  private:
    bool testAndSetTile(Tile* t, int i, int j);
    void addTile(Tile* t);
    Tile* getTile();
    vector<Tile*>* tiles;
    vector<LOD*>* lods;
    Architect* archi;
    int size;
    bool occlusion;
    int randTile;
};

#endif
